package cn.edu.neusoft.neufooddemo.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class OrderInfo implements Parcelable {

    private boolean checked;
    private String order_id;
    private String item_id;
    private String user_id;
    private String food_id;
    private String username;
    private String foodname;
    private String num;
    private String sum;
    private String suggesttime;
    private String order_time;
    private String shopname;
    private String shopaddress;
    private double price;
    private String content;
    private String comment_time;
    private String pic;

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getItem_id() {
        return item_id;
    }

    public void setItem_id(String item_id) {
        this.item_id = item_id;
    }

    public String getOrder_id() {
        return order_id;
    }

    public void setOrder_id(String order_id) {
        this.order_id = order_id;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getFood_id() {
        return food_id;
    }

    public void setFood_id(String food_id) {
        this.food_id = food_id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getFoodname() {
        return foodname;
    }

    public void setFoodname(String foodname) {
        this.foodname = foodname;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getSum() {
        return sum;
    }

    public void setSum(String sum) {
        this.sum = sum;
    }

    public String getSuggesttime() {
        return suggesttime;
    }

    public void setSuggesttime(String suggesttime) {
        this.suggesttime = suggesttime;
    }

    public String getOrder_time() {
        return order_time;
    }

    public void setOrder_time(String ordertime) {
        this.order_time = ordertime;
    }

    public String getShopname() {
        return shopname;
    }

    public void setShopname(String shopname) {
        this.shopname = shopname;
    }

    public String getShopaddress() {
        return shopaddress;
    }

    public void setShopaddress(String shopaddress) {
        this.shopaddress = shopaddress;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getComment_time() {
        return comment_time;
    }

    public void setComment_time(String comment_time) {
        this.comment_time = comment_time;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(order_id);
        parcel.writeString(item_id);
        parcel.writeString(food_id);
        parcel.writeString(foodname);
        parcel.writeString(num);
        parcel.writeDouble(price);

    }

    public static final Creator<OrderInfo> CREATOR  = new Creator<OrderInfo>() {
        //实现从source中创建出类的实例的功能
        @Override
        public OrderInfo createFromParcel(Parcel source) {
            OrderInfo orderInfo  = new OrderInfo();
            orderInfo.order_id = source.readString();
            orderInfo.item_id= source.readString();
            orderInfo.food_id = source.readString();
            orderInfo.foodname = source.readString();
            orderInfo.num = source.readString();
            orderInfo.price = source.readDouble();
            return orderInfo;
        }
        //创建一个类型为T，长度为size的数组
        @Override
        public OrderInfo[] newArray(int size) {
            return new OrderInfo[size];
        }
    };
}
